using System.Data;
using ET;
namespace DA
{
	public class Province_DAL
	{
	private clsConnect cls = new clsConnect();

	#region Getdata
	public DataTable BindGirdProvince(string keywords)
	{
        return cls.Search("sp_tb_Province_Search", "@KeyWords", keywords);
	}
    //public DataTable BindGirdProvinceDetail(int id)
    //{
    //}
	#endregion

	#region Insert
	public bool InsertProvince(Province_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Domain_Id", data.Domain_Id);
	cls.AddParameter("@Province_Alias", data.Province_Alias);
	cls.AddParameter("@Province_Name", data.Province_Name);
	cls.AddParameter("@Province_Note", data.Province_Note);
    cls.ExecuteNonQuery("sp_tb_Province_Insert");
	return true;
	}
	#endregion

	#region Update
	public bool UpdateProvince(Province_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Province_Id", data.Province_Id);
	cls.AddParameter("@Domain_Id", data.Domain_Id);
	cls.AddParameter("@Province_Alias", data.Province_Alias);
	cls.AddParameter("@Province_Name", data.Province_Name);
	cls.AddParameter("@Province_Note", data.Province_Note);
    cls.ExecuteNonQuery("sp_tb_Province_Update");
	return true;
	}
	#endregion

	#region Delete
	public bool DeleteProvince(int id)
	{
        cls.Delete("sp_tb_Province_Delete", "@Province_Id", id);
	return true;
	}
	#endregion
	}
}